package com.yannuo.dao.impl;

import com.yannuo.dao.UserDao;
import com.yannuo.entiy.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("userDao1")
public class UserDaoImpl implements UserDao {
    //依赖于User实体类
    //@Autowired 注解作用 ：自动按照类型注入对象
    @Autowired
    private User user;

    @Override
    public User getUser() {
        user.setUid(1122);
        user.setUsername("admin");
        user.setPassword("admin");
        return user;
    }
}
